import { rcaNumberFormat0,get_month_first,get_date } from './common.js'
import { commonTableOption } from './common.js'
export const startDate = get_month_first(0);
export const endDate = get_date(0);
const commonColumn = [{
  type: 'input',
  width:'150px',
  showSummary: true,
  precision: 7,
  formatter: (row, value, label, column) => {
    return rcaNumberFormat0(value)
  },
  label: '实收',
  prop: 'realIncomeMoney'
}, {
  type: 'input',
  width:'150px',
  showSummary: true,
  precision: 7,
  formatter: (row, value, label, column) => {
    return rcaNumberFormat0(value)
  },
  label: 'ACC(清分结果)',
  prop: 'accMoney'
}, {
  type: 'input',
  width:'150px',
  showSummary: true,
  precision: 7,
  formatter: (row, value, label, column) => {
    return rcaNumberFormat0(value)
  },
  label: '差异(实收-ACC)',
  prop: 'diffAccMoney'
}]

export const tableOption = {
  ...commonTableOption,
  selection: true,
  column: [{
    searchSpan: 12,
    searchRange: true,
    search: true,
    valueFormat: 'yyyy-MM-dd',
    type: 'date',
    label: '日期',
    prop: 'tradeDate',
    searchValue: [startDate, endDate], 
  },
  ...commonColumn, 
  {
    type: 'input',
    label: '设置回复期限',
    prop: 'replyLimit'
  },
  {
    type: 'select',
    label: '是否报送协查',
    dicData: [{
      label: '是',
      value: 1
    }, {
      label: '否',
      value: 0
    }],
    prop: 'sendStatus'
  },
  {
    type: 'select',
    label: '是否期限内回复',
    dicData: [{
      label: '是',
      value: '1'
    }, {
      label: '否',
      value: '0'
    }],
    prop: 'isLimitedReply',
    slot: true,
  }, {
    type: 'date',
    label: '回馈时间',
    prop: 'diffReasonTime'
  }, {
    type: 'date',
    label: '差异原因',
    prop: 'diffReason'
  }]
}


export const checkingTableOption = {
  ...commonTableOption,
  selection: true,
  column: [{
    type: 'date',
    label: '日期',
    prop: 'tradeDate'
  },
  ...commonColumn,
  {
    type: 'select',
    label: '是否期限内回复',
    dicData: [{
      label: '是',
      value: '1'
    }, {
      label: '否',
      value: '0'
    }],
    prop: 'isLimitedReply'
  }]
}


export const settingTableOption = {
  ...commonTableOption,
  column: [{
    type: 'date',
    label: '日期',
    prop: 'tradeDate'
  },
  ...commonColumn,
  {
    type: 'input',
    label: '设置回复期限',
    prop: 'replyLimit',
    slot: true,
  }]
}
